/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.acad;

import java.io.Serializable;

/**
 *
 * @author puspa
 */
public class Mahasiswa implements Serializable{

    private String nim;
    private String nama;
    private double ips;

    /**
     * @return the nim
     */
    public String getNim() {
        return nim;
    }

    /**
     * @param nim the nim to set
     */
    public void setNim(String nim) {
        this.nim = nim;
    }

    /**
     * @return the nama
     */
    public String getNama() {
        return nama;
    }

    /**
     * @param nama the nama to set
     */
    public void setNama(String nama) {
        this.nama = nama;
    }

    /**
     * @return the ips
     */
    public double getIps() {
        return ips;
    }

    /**
     * @param ips the ips to set
     */
    public void setIps(double ips) throws Exception {
        if (ips <= 4 && ips>=0) {
            this.ips = ips;
        } else {
            throw new Exception("Nilai IPS hanya boleh 0 sampai 4");
        }
    }
}
